start = 1900
end = 2000
count = 0
print('%d 年到 %d 年的闰年有：' % (start, end))

for i in range(start, end + 1):
    if (i % 4 == 0 and i % 100 != 0)or(i % 400 )== 0:
        print('%d年' % i, end=" ")
        count += 1
        if count % 5 == 0:
            print()
